//
//  DaijinquanViewController.m
//  cityStar
//
//  Created by Hancong on 15/1/11.
//  Copyright (c) 2015年 tiny. All rights reserved.
//

#import "DaijinquanViewController.h"
#import "UIColor+FlatUI.h"

@interface DaijinquanViewController ()

@property (nonatomic,weak) IBOutlet UITableView *tableView;

@end

@implementation DaijinquanViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    [self addBackButton];
    self.title = @"代金券";
}

#pragma mark - UITableViewDelegate and UITableViewDataSource
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
        static NSString *CellIdentifier = @"DaijinquanTableViewCell";
        
        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
        if (cell == nil) {
            cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
        }
//    cell.imageView.image = [UIImage imageNamed:@"drink"];
//    float sw = 30/cell.imageView.image.size.width;
//    float sh = 30/cell.imageView.image.size.height;
//    cell.imageView.transform = CGAffineTransformMakeScale(sw, sh);
    cell.textLabel.text = @"[绿叶]中秋礼盒30元代金券免费使用";
    cell.backgroundColor = [UIColor whiteColor];
    
    UIImageView *imageline = [[UIImageView alloc]initWithFrame:CGRectMake(15, 59, 305, 1)];
    imageline.image = [UIImage imageNamed:@""];
    imageline.backgroundColor = [UIColor colorFromHexCode:@"ECECEC"];
    [cell addSubview:imageline];
    return cell;
}

-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
        return 60;
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 3;
}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [self.navigationController popViewControllerAnimated: YES];
//    self.pop.alpha = 1;
//    [UIView animateWithDuration:0.3f animations:^{
//        [self.pop.cellView setFrame:CGRectMake(0, self.view.frame.size.height - 142, self.view.frame.size.width, 142)];
//    }];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
